############################################################## 
## MOD Title: Rules Management
## MOD Author: Sko22 < sko22@quellicheilpc.it > (N/A) http://www.quellicheilpc.it/
## MOD Traduccin: reef_01 < http://www.piratesdelcaribe.com.ar/foro/portal.php >
## MOD Description: Crear y modificar las Reglas(normas) del foro, 
## comprueba cuntos usuarios han ledo las normas,
## y tambien advertirlos con un mensaje privado.
## MOD Version: 1.0.2 
## Installation Level: Easy 
## Installation Time: 10 Minutes 
## Files To Edit: 
##			viewonline.php
##			admin/index.php
##			includes/constants.php
##			includes/page_header.php
##			includes/usercp_register.php
##			language/lang_spanish/lang_main.php
##			language/lang_spanish/lang_admin.php
##			templates/subSilver/overall_header.tpl
##			templates/subSilver/agreement.tpl
## Included Files: rules.php
##			admin/admin_forum_rules.php
##			language/lang_english/lang_rule.php
##			templates/subSilver/rules.tpl
##			templates/subSilver/admin/admin_forum_rules.tpl
##			templates/subSilver/admin/forum_rules_notview_body.tpl
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## I have tested this MOD whit phpBB 2.0.6 and MySQL Database 3.23.56
##
## Future versions can be found at http://www.quellicheilpc.it
## I've set up a support forum for my mods at http://www.quellicheilpc.it/forum
##
## This MOD is released under the GPL License. 
## Intellectual Property is retained by the MOD Author(s) listed above 
## Copyright:      2003 Rules Management 1.0.2 - Sko22
############################################################## 
## MOD History: 
## 
##   2003-09-05 - Version 1.0.2
##	- Fixed same bugs with the install
##   2003-09-03 - Version 1.0.1
##	- Fixed same little bugs with the language added mysql_install.php
##   2003-09-02 - Version 1.0.0
##	- Initial Release
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ COPY ]------------------------------------------ 
# 

copy rules.php to rules.php
copy admin/admin_forum_rules.php to admin/admin_forum_rules.php
copy language/lang_english/lang_rule.php to language/lang_english/lang_rule.php
copy templates/subSilver/rules.tpl to templates/subSilver/rules.tpl
copy templates/subSilver/admin/forum_rules_body.tpl to templates/subSilver/admin/forum_rules_body.tpl
copy templates/subSilver/admin/forum_rules_notview_body.tpl to templates/subSilver/admin/forum_rules_notview_body.tpl

# 
#-----[ SQL ]------------------------------------------
#
#   If you don't know how to execute sql queries, then copy
#   mysql_install.php into your phpbb directory and run it.
#   (assuming you use mysql)
#   After process delete it.
#
#   If you don't use mysql, you'll have to edit these queries accordingly
# 
#   If you have a different table prefix then change this command accordingly. 
#   I have used the default table prefix! 
# 

CREATE TABLE phpbb_rules (
  date int(11) NOT NULL default '0',
  rules text NOT NULL,
  pm_subject varchar(255) NOT NULL default '',
  pm_message text
) ;

# 
#-----[ SQL ]------------------------------------------ 
# 
#   If you have a different table prefix then change this command accordingly. 
#   I have used the default table prefix! 
# 

INSERT INTO phpbb_rules (date,rules,pm_subject,pm_message) VALUES (0,'','Attention the Rules has been adjourned.','The Rules on this Forum has Been adjourned for so much we invite you to read again it.  \r\n  \r\nThe Administrator') ;

# 
#-----[ SQL ]------------------------------------------ 
# 
#   If you have a different table prefix then change this command accordingly. 
#   I have used the default table prefix! 
# 

ALTER TABLE phpbb_users ADD user_rules INT( 11 ) NOT NULL ;

# 
#-----[ OPEN ]------------------------------------------ 
# 

viewonline.php

# 
#-----[ FIND ]------------------------------------------ 
# 

				case PAGE_FAQ:
					$location = $lang['Viewing_FAQ'];
					$location_url = "faq.$phpEx";
					break;

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

				case PAGE_RULES:
					$location = $lang['Viewing_RULES'];
					$location_url = "rules.$phpEx";
					break;

# 
#-----[ OPEN ]------------------------------------------ 
# 

admin/index.php

# 
#-----[ FIND ]------------------------------------------ 
# 

					case PAGE_FAQ:
						$location = $lang['Viewing_FAQ'];
						$location_url = "index.$phpEx?pane=right";
						break;

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

					case PAGE_RULES:
							$location = $lang['Viewing_RULES'];
							$location_url = "index.$phpEx?pane=right";
							break;


# 
#-----[ FIND ]------------------------------------------ 
# 

						case PAGE_FAQ:
							$location = $lang['Viewing_FAQ'];
							$location_url = "index.$phpEx?pane=right";
							break;

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

						case PAGE_RULES:
								$location = $lang['Viewing_RULES'];
								$location_url = "index.$phpEx?pane=right";
								break;

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/constants.php

# 
#-----[ FIND ]------------------------------------------ 
# 

define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

define('RULES_TABLE', $table_prefix.'rules');

# 
#-----[ FIND ]------------------------------------------ 
# 

define('PAGE_GROUPCP', -11);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

define('PAGE_RULES', -12);

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/page_header.php

# 
#-----[ FIND ]------------------------------------------ 
# 

	'L_MEMBERLIST' => $lang['Memberlist'],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	'L_FORUM_RULES' => $lang['Forum_Rules'], 

# 
#-----[ FIND ]------------------------------------------ 
# 

	'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	'U_FORUM_RULES' => append_sid('rules.'.$phpEx),

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------ 
# 

		'AGREEMENT' => $lang['Reg_agreement'],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

		'AGREEMENT_RULES' => $lang['Reg_agreement_Rules'],

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_spanish/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# Busqueda parcial, la linea acaba con punto y coma (;)

$lang['Agree_under_13'] =

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

$lang['Reg_agreement_Rules'] = 'Pulsando el Registro debajo de usted, estara de acuerdo con las <a href="rules.php">Normas</a>.';

# 
#-----[ FIND ]------------------------------------------ 
# 

//
// That's all, Folks!
// -------------------------------------------------

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

$lang['Viewing_RULES'] = 'Ver las reglas';
$lang['Forum_Rules'] = 'Normas';

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_spanish/lang_admin.php

# 
#-----[ FIND ]------------------------------------------ 
# Busqueda parcial, la linea acaba con punto y coma (;)

$lang['Prune'] =

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$lang['Rules'] = 'Normas';

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_english/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$lang['Agree_under_13'] = 'I Agree to these terms and am <b>under</b> 13 years of age';

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

$lang['Reg_agreement_Rules'] = 'By clicking Register below you agree with the <a href="rules.php">Rules</a>.';

# 
#-----[ FIND ]------------------------------------------ 
# 

//
// That's all, Folks!
// -------------------------------------------------

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

$lang['Viewing_RULES'] = 'Viewing the Rules';
$lang['Forum_Rules'] = 'Rules';

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_english/lang_admin.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$lang['Prune'] = 'Pruning';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$lang['Rules'] = 'Rules';

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/overall_header.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 

<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<a href="{U_FORUM_RULES}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_FORUM_RULES}" hspace="3" />{L_FORUM_RULES}</a>&nbsp; &nbsp;

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/agreement.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 

<br />{AGREEMENT}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<br /><br />{AGREEMENT_RULES}

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 